package com.atguigu.aiproject.entity;


import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户点赞作品关联表实体类
 */
@Data

@TableName("user_like_creation")
public class UserLikeCreation {

    /**
     * 主键ID，自增唯一标识每条点赞记录
     */
    @TableId
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    @TableField("creation_id")
    private Integer creationId;

    /**
     * 点赞时间，默认值为记录创建时的当前时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT) // 插入时自动填充
    private LocalDateTime createTime;

    public UserLikeCreation(Integer userId, Integer creationId, LocalDateTime createTime) {
        this.userId = userId;
        this.creationId = creationId;
        this.createTime = createTime;
    }
}
